/*
 * 百度在线网络技术（北京）有限公司拥有本软件版权2020并保留所有权利。
 * Copyright 2020, Baidu.com,Inc 2:Baidu Online Network Technology (Beijing) Co.,Ltd,
 * All rights reserved.
 */

package com.azdebugit.concurrent;

import java.util.concurrent.CountDownLatch;
  
public class Boss implements Runnable {  
  
    private CountDownLatch downLatch;  
      
    public Boss(CountDownLatch downLatch){  
        this.downLatch = downLatch;  
    }  
      
    public void run() {  
        System.out.println("老板正在等所有的工人干完活......");  
        try {  
            this.downLatch.await();  
        } catch (InterruptedException e) {  
        }  
        System.out.println("工人活都干完了，老板开始检查了！");  
    }  
  
}  